<?php include("../config.php");

$progid      = $_GET["progid"];
if(empty($progid) or !intval($progid)) { // If progid is not specified or contains wrong data
	die("<p><b>Invalid page access!</b></p>\n");
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title><?php echo $sitename; ?> - Sysop: Remove Custom Download URL</title>
<meta name="description" content="<?php echo $sitename; ?> - Sysop: Remove Custom Download URL">
<meta name="keywords" content="free to try, software, shareware, freeware, developers, vendors, download, PAD">
<meta name="author" content="Andrey Aleksanyants, M.D.">
<meta name="copyright" content="easy HTools">
<meta http-equiv="imagetoolbar" content="no">
<link rel="stylesheet" type="text/css" href="../<?php echo $cssfile; ?>">
<link rel="shortcut icon" href="../favicon.ico">
</head>
<body>
<table class="tmain" align="center" width="90%" cellspacing="0" cellpadding="0">
<tr>
<td class="tmain">
<table class="tlogo" align="center" width="100%" cellspacing="0" cellpadding="4">
<tr>
<td align="right">
<p><a href="index.php">Home</a></p>
</td>
</tr>
</table>
</td>
</tr><tr>
<td class="tmain">
<br>
<table align="center" width="100%" border="0" cellspacing="0" cellpadding="1">
<tr valign="top">
<td class="tbody">
<h1><?php echo $sitename; ?> - Sysop: Remove Custom Download URL</h1>
<?php

// Connecting to database
if(!($link_id = mysql_connect($dbhost, $userid, $userpassword))) {
	die("<p><b>Error connecting to the database server:</b> " . mysql_error() . "</p>\n");
}
mysql_select_db($dbname);
mysql_query("DELETE FROM customurls WHERE progid = '$progid'", $link_id) or die("<p>Error removing Custom Download URL: " . mysql_error() . "</p>\n");
echo "<p>Custom download URL for ProgID=" . $progid . " successfully removed.</p>\n";
echo "<p><a href=\"custommanage.php\">Manage</a> your Custom Download URLs.</p>\n";

// Disconnecting from database
mysql_close($link_id);
?>
<br>

</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>